Three-dimensional shadows cast by objects

ABSTRACT

Particular embodiments display an object over a background on a screen of an electronic device; and display a shadow effect for the object on the screen of the electronic device, including simulating a three-dimensional (3D) environment encompassing the object; simulating a light source at a specific position within the simulated 3D environment; simulating a shadow cast by the object on the background as a result of the light source shining on the object in the simulated 3D environment; and rendering the shadow on the screen of the electronic device.

RELATED APPLICATION

This application claims the benefit, under 35 U.S.C. §119(e), of U.S. Provisional Patent Application No. 61/593,841, filed on 1 Feb. 2012, which is incorporated herein by reference in its entirety and for all purposes.

TECHNICAL FIELD

This disclosure generally relates to presenting multimedia objects, such as images or videos, in a user interface.

BACKGROUND

A user interface (UI), in the industrial design field of human-machine interaction, is the space where interactions between humans and machines occur. The goal of interactions between a human, often referred to as a “user”, and a machine at the user interface is user's control of the machine and its operations (e.g., through user input) and machine feedback (e.g., through program output). A graphical user interface (GUI) is a type of user interface that allows users to interact with software applications executing on electronic or computing devices through multimedia objects (e.g., images, videos, audios, etc.) rather than purely text commands.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a portion of an example object hierarchy.

FIGS. 2A-2D illustrate an example of simulating a 3D object on a 2D medium.

FIGS. 3A-3C illustrate an example of simulating a 3D object on a 2D medium.

FIG. 4 illustrates an example of simulating a 3D object on a 2D medium.

FIGS. 5A-5B illustrate an example of simulating a light source in a virtual 3D space.

FIG. 6 illustrates an example series of pages in an electronic book.

FIGS. 7A-7D illustrate an example of previewing objects arranged in a series.

FIGS. 8A-8B illustrate an example of scrolling through a series of objects.

FIGS. 9A-9C illustrate an example of scrolling through objects in a hierarchy.

FIG. 10 illustrates an example electronic device.

DESCRIPTION OF EXAMPLE EMBODIMENTS

In particular embodiments, a user interface (UI), and more specifically, a graphical user interface (GUI) may include any number of UI components or elements arranged in a hierarchy. The components of a user interface may be presented to users according to the hierarchical structure. In particular embodiments, some of these UI components may correspond to or represent multimedia objects, such as images, videos, or audios. Sometimes, these multimedia UI components may be presented to users individually on their own. Other times, they may be presented to users while contained in other UI components, such as being included in a window, a panel, or a web page. In particular embodiments, there may be multiple presentations modes for presenting images or videos in a user interface.

In particular embodiments, a user may interact with a multimedia UI component using a suitable input device (e.g., a finger or stylus on a touch-sensitive screen or a mouse). For example, the user may play or pause a video, or zoom or pan or rotate an image. In particular embodiments, depending on how or where a multimedia UI component is presented to a user (e.g., which presentation mode it is in), the user's interaction with the multimedia UI component may result in different behaviors from the multimedia UI component.

Object Hierarchy

In particular embodiments, objects may be organized into a hierarchy. For example, objects may be organized into a hierarchy based on how the individual objects are related to each other. The object hierarchy may have any number of levels, and at each level, there may be any number of objects. Parent-child or sibling relationships may exist between specific objects in the hierarchy. Within the hierarchy, a parent object is one level above the level of its child objects. Two sibling objects are at the same level and share the same parent object. In addition, any portion of the hierarchy may also be considered a hierarchy in itself

FIG. 1 illustrates a portion of an example object hierarchy 100 that includes a number of objects 110. In particular embodiments, an object in a hierarchy may or may not have a parent. If an object does not have a parent, it may be referred to as a “root” object (e.g., object 110A). In particular embodiments, an object in a hierarchy may or may not have any children. If an object does not have any children, it may be referred to as a “leaf” or “terminal” object (e.g., object 110B). If an object does have children (e.g., object 110C), it may have any number of children. In addition, objects sharing the same parent may be referred to as each other's “siblings”. For example, in FIG. 1, object 110C is the parent of objects 110D and 110B. Objects 110D and 110B are the children of object 110C and are siblings to each other. Thus, a hierarchy of objects (e.g., object hierarchy 100) not only includes the individual objects themselves but also indicates the relationships among the specific objects. Moreover, the position of a specific object within the hierarchy may indicate its relationships with other objects in the hierarchy.

Objects may be of any applicable types. In particular embodiments, an object may be a component of a user interface. In this case, the object hierarchy may be a UI hierarchy (e.g., a hierarchy of UI components). In other words, components of a user interface may be organized into a hierarchy. The UI hierarchy may have any number of layers corresponding to the levels of the object hierarchy, and at each layer, there may be any number of UI components. The position of a specific UI component within the hierarchy may indicate its relationships with other UI components in the hierarchy. The UI components may be presented to users according to the hierarchical structure (e.g., in layers). In particular embodiments, some of these UI components may be multimedia objects, such as images, videos, or audios.

In particular embodiments, an object may correspond to a piece of user-consumable content. In particular embodiments, an object may be consumed by a user if the user may, for example and without limitation, interact with, view, read, listen to, manipulate, or handle the object. For example, some user-consumable objects may be texts, images, videos, audios, feeds, executables (e.g., application programs or games), websites, web pages, digital books, photo albums, posts, or messages. In particular embodiments, user-consumable content, or more specifically, user-consumable objects, may be organized into a hierarchy based on, for example, the relationships among the individual pieces of user-consumable content. Consequently, a hierarchy of user-consumable content may be represented as a hierarchy of objects, where individual objects in the hierarchy may correspond to specific pieces of user-consumable content (e.g., texts, images, videos, audios, executables, etc.). In addition, the structure of the hierarchy indicates the relationships among the specific pieces of user-consumable content.

In particular embodiments, the relationships among the objects in a hierarchy may correspond to how the objects are organized and presented to users. In particular embodiments, when presenting a hierarchy of objects to a user of a device, the objects may be organized and presented according to the structure of the object hierarchy. More specifically, the objects may be presented in a user interface provided on the device according to the structure of the object hierarchy so that the user interface itself becomes hierarchical as well. Consequently, the user interface may include a number of layers, respectively corresponding to the levels in the object hierarchy. The positions of the objects within the hierarchy are preserved in the user interface, such that a specific object at a specific position in the hierarchy is presented in the corresponding position in the user interface. The relationships among the objects within the hierarchy are maintained in the user interface. In other words, there may be an one-to-one correspondence between an object in the object hierarchy and a UI component in the user interface, such that each object is represented by a UI component.

As an example, in the context of the desktop of a computing device, the desktop may be a parent object, and sometimes the root object of a hierarchy, whose child objects are the individual software applications available on the desktop. A software application, while itself being one of the child objects of the desktop, is also the parent object of the individual components of that software application. Different software applications may include different components. For example, for a software application that manages digital books (e.g., a book reader application), its components may include the digital books available, the individual chapters of each book, the pages of each chapter, and the texts, images, videos, audios, or any graphical user interface (GUI) or content or media elements on each page. Each of these also corresponds to an object in the hierarchy. More specifically, when these objects are organized in a hierarchy, the book application may be the parent object of the digital books. A digital book may be the parent object of the individual chapters of that book. A chapter, while itself being one of the child objects of the book, is also the parent object of the pages in that chapter. A page is the parent object of the texts, images, videos, audios, or any GUI or content or media elements on that page. A text block, image, video, audio, or GUI or content or media element is one of the child objects of the page to which it belongs. Similarly, for a software application that manages news feeds, its components may include the individual news channels and the news stories within each channel. Each of these may correspond to an object. When these objects are arranged in a hierarchy, the news-feed application, while itself being one of the child objects of the desktop, is also the parent object of the news channels. A news channel in turn is the parent object of the news stories included in that channel. Some of these objects may respectively correspond to UI components of a user interface presented on the computing device.

As another example, in the context of the Internet or the World Wide Web, the Internet may be a parent object whose child objects are the individual websites. A website, while itself being one of the child objects of the Internet, is also the parent object of the individual web pages of that website. A web page, while itself being one of the child objects of the website to which it belongs, is the parent object of the texts, images, videos, audios, or links (e.g., Uniform Resource Locators (URLs)) included in the web page. Each text block, image, video, audio, or link may also correspond to a specific object in the hierarchy. Some of these objects may respectively correspond to UI components of a web-based user interface that may be presented to a user through a web browser.

As a third example, a website, such as a social-networking website, may also be arranged in such a hierarchical structure for navigating the content of the social-networking website. In this context, the social-networking website may be a parent object whose child objects are the components (e.g., photo albums, user profile pages, etc.) of the website. For example, a photo album, while itself being a child object of the social-networking website, may in turn be a parent object, and the individual photos within the album may be the child objects of the photo album. A user's profile page may be structured in such a hierarchical fashion as well. The profile page itself may be considered a parent object, and the individual objects on the profile page may be the child objects of the profile page. In particular embodiments, a profile page may be considered and rendered (e.g., for presentation to a user) as a linear timeline of objects, such as, for example and without limitation, photos, photo albums, check-ins, comments from other users, attended events, tags, etc. In particular embodiments, child objects in the hierarchy may also include applications the user has added to the profile page, such as a Spotify music sharing application. Moreover, individual stories, songs the user has listened to, and playlists may be child objects at a lower hierarchical level. In particular embodiments, child objects in the hierarchy may include particular sections of a user's profile, such as the user's education and employment information, or the public “wall” of the user's profile page. This disclosure contemplates representing and addressing any collection of content in a hierarchical object or nodal structure. Again, these objects may respectively correspond to UI components of a web-based user interface that may be presented to a user through a web browser.

As these examples illustrate, an object may be of any type and this disclosure contemplates any applicable types of objects. For example and without limitation, the term “object” may refer to any type of content, including but not limited to images, videos, captions, text blocks or boxes, user interface elements, URLs, newsfeed stories, references to other objects, advertisements, calendar events, units for displaying open graph analysis that may be graphically rendered, applications, websites, web pages, books, chapters. In particular embodiments, given a hierarchy of objects, which may be a portion of another, larger hierarchy of objects, the hierarchical relationships (e.g., parent-child or sibling relationships, positions of the objects within the hierarchy) between specific objects may direct some aspects of how these objects behave in the context of a user interface or how the objects are presented to a user.

A hierarchy of objects may be displayed in a user interface that has a corresponding hierarchical structure. In particular embodiments, the user interface may include any number of layers, where each layer corresponds to a specific level of the object hierarchy. In particular embodiments, the lower layers of the user interface correspond to the top levels of the object hierarchy, while the upper layers of the user interface correspond to the bottom levels of the object hierarchy. That is, an object is displayed at a layer in the user interface that is below the layer of its child object and above the layer of its parent object. Since a child object and a parent object are displayed in two separately layers in the user interface, the child object may be considered as “floating” on top of its parent object.

In particular embodiments, the user interface may be displayed on the screen of an electronic device for presentation to users. In particular embodiments, the screen may be touch sensitive and include a touch-sensitive input. A user may interact with various objects displayed on the screen by touching the screen with his fingers.

Shadows Cast by Objects

A display device, such as the screen of an electronic device, is a two-dimensional (2D) medium. Nevertheless, three-dimensional (3D) effect may be simulated (e.g., using shadows and perspective techniques) to present and display an 3D object on such 2D medium, similar to painting a 3D object on a 2D canvas. In particular embodiments, a 3D virtual world may be created and 3D objects may be placed in such a virtual world. Shadows may be cast around an object to simulate the 3D effect. The size, shape, orientation, and color of the shadows may depend on, for example and without limitation, the size, shape, orientation, or color of the object, the distance between the object and the light source, and the spatial relationship between the object and the light source. The objects may be projected and displayed onto a 2D medium using applicable perspective techniques.

As an example, FIG. 2A illustrates presenting a 3D object in a user interface displayed on a 2D medium and using shadows to simulate the 3D effect. In this case, the user interface is a page 200 of an electronic book. The page may include texts and other multi-media objects, such as image, video, clickable URL, and caption. In FIG. 2A, image 210 visually floats on top of page 200, indicating that users may interact with image 210 in various manners. In fact, in FIG. 2A, only half of the entire image 210 (e.g., a cropped version) is actually shown as image 210 lays flat on page 200. A user may “lift” image 210 up and off page 200 by pinching image 210 with two fingers, as illustrated in FIG. 2B. The two fingers may be placed anywhere near one or more edges of image 210. When image 210 is pinched up and off the page, the entire image appears, but folded at an angle relative to the distance between the two fingers the user used to pinch the image. If the user pinches out beyond a predetermined threshold distance and then takes his fingers off the image, the image expands to fill the entire screen. To simulate the effect of a two-dimensional object (e.g., folded image 210) in a three-dimensional virtual space, shadows are placed around image 210.

In particular embodiments, a light source is simulated to cause the effect of shadowing around a floating object. A virtual 3D space may be constructed to encompass the object and the virtual light source. Light is shone on the object (e.g., image 210), causing shadows to be cast around the object on the background (e.g., page 200).

For example, in the case illustrated in FIG. 2B, a simulated light source 250 may be placed in the center of page 200. The shadows around image 210 change depending on the position of image 210 in relation to simulated light source 250. For example, in FIG. 2C, image 210 is moved toward the left side of the screen (e.g., near the left edge of page 200). In this case, there is more, darker shadow on the left side of image 210 and less, lighter shadow on the right side of image 210, as the left side of image 210 faces away from simulated light source 250 and the right side of image 210 faces toward simulated light source 250. In addition, image 210 is rotated more toward the left so that there is more of the right half of image 210 shown but less of the left half of image 210 shown. In contrast, in FIG. 2D, image 210 is moved toward the right side of the screen (e.g., near the right edge of page 200). In this case, there is more, darker shadow on the right side of image 210 and less, lighter shadow on the left side of image 210, as the right side of image 210 faces away from simulated light source 250 and the left side of image 210 faces toward simulated light source 250. In addition, image 210 is rotated more toward the right so that there is more of the left half of image 210 shown but less of the right half of image 210 shown. In particular embodiments, when an object (in the example above, image 210) is manipulated (e.g., moved or rotated), other objects, such as text objects, layered below the image is stationary, permitting the user to manipulate the image and read the entire text simultaneously.

Similar shadowing effect may be applied to an image when the image is pinched up and moved toward the top or bottom of the screen. As an example, a page 300 illustrated in FIG. 3A includes a floating image object 310. In FIG. 3A, again, image 310 is displayed on a page 300 of an electronic book. In FIG. 3A, image 310 lays flat on page 300 and only a portion of image 310 is shown. A user may pinch image 310 up with two fingers (e.g., by placing the two fingers near the opposite edges of image 310). When this happens, image 310 unfolds partially as described above. In FIG. 3B, image 310 is brought near the top of the screen. At this position, image 310 is rotated more toward the bottom so that more of the top half of image 310 is shown, and there is more shadow on the bottom side of image 310 than on the top side of image 310. In this example, a simulated light source is placed above page 300. In contrast, in FIG. 3C, image 310 is brought near the bottom of the screen. At this position, image 310 is rotated more toward the top so that more of the bottom half of image 310 is shown, and there is more shadow on the top side half of image 310 than on the bottom side of image 310.

When a floating object is pinched up, it may be moved to different positions on the screen, as illustrated in FIGS. 2C, 2D, 3B, and 3C. It may also be rotated, as illustrated in FIG. 4. Here, an image 410 included in a page 400 has been pinched up (e.g., using two fingers) and rotated (e.g., by rotating the fingers pinching image 410). The shadows around image 410 rotate with image 410 accordingly to maintain the three-dimensional effect. The shape of the shadows may also be adjusted based on the current spatial relationships between the object and the light source. In addition, as illustrated in FIG. 4, a portion of image 420 overlays the text behind it on page 400. In particular embodiments, when a floating object (e.g., image or video) overlays some text behind it, the appearance of the text may be adjusted to simulate the effect of the shadow casted by the object on the text (e.g., slightly darkened or distorted). In particular embodiments, when an object is picked up (e.g., pinched with two fingers), its size may change with the movement of the two fingers. By moving the two fingers further apart, the object may be enlarged. Conversely, by moving the two fingers closer together, the size of the object may be decreased.

In particular embodiments, when an object is being manipulated by a user (e.g., picked up, rotated, zoomed in or out, etc.), the object itself, not an instance of the object, is manipulated. This ensures the self-consistency of the UI. For example, while a video is being played, the user may manipulate the video object (e.g., pinched down to a thumbnail size or pinched up to full screen). While the video object is being manipulated by the user, the playback of the video continues uninterrupted.

In particular embodiments, to simulate the effect of picking up an object in the three-dimensional virtual space, when an object is picked up, the object below it is moved backward in the virtual three-dimensional space. As an example, to simulate the effect of image 210 being “picked up” from page 200, the size of image 210 (i.e., object) may be increased while the size of page 200 (i.e., background) may be decreased so that it appears as if image 210 is moving closer to the user. As another example, when image 410 is pinched up, page 400 is moved backward to create the visual effect of a greater distance between image 410 and page 400, which in turn simulates the effect of image 410 being picked up from page 400. The shadow image 410 casts on page 400 increases in size accordingly.

The simulation of the effect of picking up a two-dimensional object in a virtual three-dimensional space is further illustrated in FIGS. 5A-5B. In FIG. 5A, the distance between objects 510 and 520 is D1. A light source 530 above object 510 causes object 510 to cast a shadow 541 of object 510 onto object 520. In FIG. 5B, object 510 has moved away from object 520 and closer to light source 530. The distance between objects 510 and 520 is D2, which is greater than D1. Light source 530 again causes object 510 to cast a shadow 542 of object 510 onto object 520. But because object 510 is now further away from object 520, shadow 542 is larger than shadow 541. Thus, by changing the size of the shadow a first object casts onto a second object, it may stimulate the effect that the first object is moving away from (e.g., increasing shadow size) or moving closer toward the second object (e.g., decreasing shadow size).

In particular embodiments, the shadow of an object (e.g., an image) may be implemented as a separate layer of the user interface. For example, in FIG. 4, image 410 partially overlaps some texts on page 400. There is shadow 420 surrounding image 410. The texts covered by shadow 420 may be darkened accordingly as well. In some implementations, the shadow around an object may be drawn as a blurry dot, sliced up horizontally and vertically, and then stretched up to fill the necessary shadow area. This allows the shadow of an object to be determined without performing ray tracing, which is very computationally intensive and thus resource demanding.

In particular embodiments, when an object is pinched up with two fingers, the size of the object may change depending on the positions of the two fingers. As an example, in FIG. 2B, the two fingers are placed near the opposite edges of image 210. If the two fingers move closer together, image 210 may fold more so that the two edges of image 210 move closer together, following the movement of the two fingers. Conversely, if the two fingers move further apart, image 210 may fold less so that the two edges of image 210 move further apart, again following the movement of the two fingers. The shadows around image 210 also move (e.g., expand or contract in size) with the edges of image 210, following the movement of the two fingers.

In particular embodiments, to render the shadows around an object in a user interface having a hierarchical structure, the object may be rendered on a first layer in the hierarchy while the shadows around the object may be rendered on a second layer, below the first layer, in the hierarchy. In particular embodiments, to simulate the shadows, a dark pixel (e.g., black or dark grey) may be placed behind the object and near the center of the object, and the pixel may be enlarged and blurred until the pixel extends beyond at least some of the edges of the object. In particular embodiments, the color of the pixel may be a gradient, gradually transitioning from light at the edges of the pixel to dark at the center of the pixel, as illustrated in FIG. 4.

Previewing Objects Arranged in a Series

Sometimes, a collection of objects may be arranged in a series and displayed according to a specific order. Furthermore, due to the size restriction of the display device (e.g., a screen of an electronic device), one object from the series may be displayed at a time. As an example, an electronic book may include many pages. A user may read one page at a time so that one page is displayed on the user's device at a time. Furthermore, the pages are displayed according to a specific order (e.g., the order of the pages in the book). FIG. 6 illustrates a series of pages 610 contained in an electronic book. As another example, a photo album may include many photos. A user may view one photo at a time so that one photo is displayed on the user's device at a time. The photos may be displayed according to a specific order (e.g., chronological order).

In particular embodiments, the display device may be a touch screen device. The user may move forward or backward in the series of objects by swiping fingers across the touch screen (e.g., swiping fingers toward the left side of the screen moves toward the end of the series and swiping fingers toward the right side of the screen moves toward the beginning of the series).

In particular embodiments, when an object in a series is displayed on the screen, the user may preview the object immediately before or after that object in the series. The object currently being displayed may be referred to as the “current object”. As an example, suppose that the pages of an electronic book are displayed one page at a time. In FIG. 7A, a specific page 750 from the book is currently displayed, and current page 750 occupies the entire display screen.

If the user wishes to preview the page immediately after page 750, the user may swipe his fingers across the screen toward the left side of the screen. This may cause page 750 to move toward the left side of the screen corresponding to the movement of the user's fingers. In FIG. 7B, a portion of page 750 has moved off the left edge of the screen. The remaining portion of page 750 now only occupiers a portion of the display screen (on the left side of the screen). At the same time, a portion of page 760, which is the page immediately after page 750, has moved onto the screen and is displayed immediately next to and after page 750, in the available portion on the right side of the display screen. The user may now preview page 760. In particular embodiments, page 760 is displayed in a size smaller than that of page 750. This visually indicates to the user that page 750 is still the current page. In addition, in particular embodiments, a shadow 762 is displayed around page 760 (i.e., the page being previewed). Alternatively, page 760 may be slightly dimmed. This helps the user avoid claustrophobia.

If the user wishes to preview the page immediately before page 750, the user may swipe his fingers across the screen toward the right side of the screen. This may cause page 750 to move toward the right side of the screen corresponding to the movement of the user's fingers. In FIG. 7C, a portion of page 750 has moved off the right edge of the screen. The remaining portion of page 750 now only occupiers a portion of the display screen (on the right side of the screen). At the same time, a portion of page 740, which is the page immediately before page 750, has moved onto the screen and is displayed immediately next to and before page 750, in the available portion on the left side of the display screen. The user may now preview page 740. In particular embodiments, again, page 740 is displayed in a size smaller than that of page 750. This visually indicates to the user that page 750 is still the current page. In addition, in particular embodiments, a shadow 742 is displayed around page 740 (i.e., the page being previewed). Alternatively, page 740 may be slightly dimmed. This helps the user avoid claustrophobia.

The amount of displacement for page 750 may correspond to the amount of movements of the user's fingers. The speed of the pages' movements may be the same as the speed of the user's fingers' movements. In particular embodiments, if the user's fingers move across the screen for a distance less than a threshold (e.g., half of the width of the screen), then the page immediately before or after the currently displayed page is shown in its preview mode, as illustrated in FIGS. 7B and 7C. On the other hand, if the user's fingers move across the screen for a distance more than a threshold (e.g., half of the width of the screen), then the currently displayed page becomes the secondary page and the previewed page becomes the primary page. For example, in FIG. 7D, the user's fingers have moved toward the left of the screen sufficiently far such that page 750 becomes the secondary page and page 760 (i.e., the page that originally being previewed) becomes the primary page. The size of page 750 is now smaller than that of page 760. Furthermore, the shadow 752 is now around page 750, instead of page 760. At this point, if the user's fingers continue to move toward the left of the screen, eventually, page 750 shall move off the screen completely and page 760 shall move onto the screen completely. Page 760 is then displayed in its entirety and occupiers the entire screen. Page 760 now becomes the current page.

In particular embodiments, when the user releases the pages by moving his fingers away from the touch screen, if the user's fingers have moved across the screen for a distance less than a threshold, then the preview page is moved off the screen while the current page is moved back into its original position so that the entire current page is displayed and occupies the entire screen. On the other hand, if the user's fingers have moved across the screen for a distance more than a threshold, then the original current page is moved off the screen. Instead, the original preview page is centered on the screen so that the entire preview page is displayed and occupies the entire screen. At this point, the preview page becomes the current page. For example, if the user releases the pages in the situation illustrated in FIG. 7C, page 740 (the preview page) moves off the screen and page 750 returns to its original position and occupies the entire screen. On the other hand, if the user releases the pages in the situation illustrated in FIG. 7D, page 750 moves off the screen and page 760 (the preview page) moves to the center of the screen and is displayed in its entirety and occupies the entire screen. Page 760 is now the current page.

Scrolling Through Objects Arranged in a Series

With a collection of objects arranged in a series and displayed according to a specific order, sometimes, the user may also scroll through the objects. Again, the user may swipe his fingers across the screen to move forward or backward along the series. For example, to scroll forward along the series, the user may swipe his fingers toward the left or up side of the screen. Conversely, to scroll backward along the series, the user may swipe his fingers toward the right or down side of the screen.

When the user is scrolling through a series of objects, at any given time, a portion of the series may be displayed on the screen. For example, an electronic book may include a series of pages, and the user may scroll through these pages. At a particular time, only a few pages in the book are displayed on the screen. An album may include a series of images, and the user may scroll through these images. At a particular time, only a few images in the album are displayed on the screen. As illustrated in FIG. 8A, objects 810, 820, 830, 840, and 850, which may belong to a series of objects (e.g., pages or images) that include other additional objects, may be displayed on the screen at a particular time. Due to the size limitation of the screen, a portion of objects 810 and 850 are cut off at the edge because these two objects are respectively positioned near the left and right sides of the screen and cannot be fit onto the screen completely.

While the user is looking at the objects displayed on the screen at any given time, the user may focus his attention more on the object near the center of the screen. In particular embodiments, the object near the center of the screen (e.g., object 830) may be visually embellished so that it stands out more to the user.

For example, as illustrated in FIG. 8A, object 830 is currently near the center of the screen. Object 830 may be displayed at a size somewhat larger than the other objects 810, 820, 840, 850. There may be a boundary around each object, and the boundary of object 830 currently near the center of the screen may slightly overlap or be on top of objects 820 and 840 positioned immediate to the left and right of object 830. In addition, there may be a shadow around object 830. This disclosure contemplates any applicable visual embellishment for object 830 in order to make it stand out more to the user. In particular embodiments, to make object 830 near the center of the screen stand out, the two objects next to it (i.e., objects 820 and 840) may be slightly darkened.

In particular embodiments, the screen may be touch sensitive. The user may swipe his fingers across the screen to scroll through the series of objects. Suppose that the user swipes his fingers toward the left side of the screen so that the user is scrolling toward the back of the series. In this case, objects 810, 820, 830, 840, and 850 may gradually move toward the left (e.g., at the same speed as the user's fingers). As illustrated in FIG. 8B, object 810 may move completely off the screen while object 850 may move completely onto the screen. The object immediately following object 850 in the series (i.e., object 860) may gradually become visible. Further more, object 830 is no longer near the center of the screen. Instead, object 840 is now near the center of the screen.

In particular embodiments, the visual embellishment for object 830 may be removed as it is no longer near the center of the screen. Object 830 is now displayed at the same size as the other objects and there is no shadow around object 830. On the other hand, visual embellishment, such as larger size and shadow, may be applied to object 840 to make it stand out more as it is now near the center of the screen.

In particular embodiments, as the user scroll through a series of objects, at any given time, a portion of the series is displayed on the screen. The particular object that is currently near the center of the screen is visually embellished so that it stands out more. As each object moves near the center of the screen, visually embellishment is applied to that object. As each object moves away from the center of the screen, visual embellishment is removed for that object.

In particular embodiments, objects may be arranged in a hierarchy and displayed in a user interface that has a corresponding hierarchical structure. For example, components of an electronic book may be arranged and displayed hierarchically. The book itself may be at the top level of the hierarchy. The second level may be the individual sections of the book. The third level may be the individual pages of the book. Each page is the child of the section to which it belongs, and each section is the parent of all the pages in that section.

When such a book is displayed in a hierarchical user interface, the relationships between the sections and the pages may be maintained. For example, all the sections may form a series of objects, while all the pages may form another series of objects. The sections may be displayed in one layer of the user interface, while the pages may be displayed in another layer, above the section layer, of the user interface. The user may scroll either the sections or the pages.

In particular embodiments, when the user scrolls through the sections, as the scrolling moves from one section to another section, the pages may be automatically advanced, such that when the user is currently viewing the first section, the pages in the first section are displayed, but when the user is currently viewing the second section, the pages in the second section are displayed. On the other hand, when the user scrolls through the pages, as the scrolling moves from pages of one action to pages of another section, the sections may be automatically advanced, such that when the user is currently viewing the pages of the first section, the first section is displayed, but when the user is currently viewing the pages of the second section, the second section is displayed.

To further explain this scrolling process, suppose that a user has moved to a specific section of the book by sliding a finger in the left direction across the screen of the electronic device. FIG. 9A illustrates a section (e.g., the “Introduction” section) of the book. In this view, the first or title page 930A of the section is used as the background 910 for the entire section. Near the bottom of the screen is a table of contents (TOC) area 920. TOC area 920 includes the individual pages 930 of the current section, shown in thumbnail format and arranged horizontally across the screen of the electronic device. In particular embodiments, each page thumbnail is implemented as an object floating on an imaginary or metaphorical “strip” of paper. The metaphor of objects floating on a strip of paper reflects the nodal hierarchical structure of each section. The background page represents a chapter/section (the parent object), whereas each of the floating objects in the TOC strip is a child object. This disclosure contemplates extension of this concept to any collection of content organized in a hierarchical structure. Thus, a photo album having the aforementioned nodal structure may be rendered as a film strip (parent object) including floating photo thumbnails for each photo contained in the album (child objects). As another example, a user profile or timeline may be represented as an infinite imaginary strip of paper (the parent object) containing a plurality of floating thumbnails representing photo albums, applications, events, etc. (child objects), each of which may contain its own child objects.

FIG. 9A illustrates a layered arrangement of objects corresponding to an object hierarchy. In this case, background area 910 is the bottom layer. TOC area 920 is another layer positioned on top of the background layer. Pages 930 are a third layer positioned on top of the TOC layer. In an object hierarchy, the background may be the parent of the TOC, and the TOC may be the parent of the pages.

A user may move forward and backward to different pages in the section by sliding a finger in the left or right directions, respectively, across TOC area 920. Suppose that a user has slide a finger in the left direction across TOC area 920. In FIG. 9B, more pages (e.g., pages 930F, 930G, 930H) of the current “Introduction” section appears in TOC area 920.

Similarly, a user may move forward and backward to different sections in the book by sliding a finger in the left or right directions, respectively, either across background area 910 or across TOC area 920. When the user slides a finger across TOC area 920, the current section switches to the next section when the user reaches the last page of the current section; or the current section switches to the previous section when the user reaches the first page of the current section. FIG. 9C illustrates the transition between the “Introduction” section and “Chapter 1” of the book. Here, the “Introduction” section is currently being viewed, and “Chapter 1” is the section that immediately follows the “Introduction” section in the book. In one situation, as a user's finger slides in the left direction across TOC area 920, eventually the last page of the “Introduction” section is reached. At this point, title page 930A of the “introduction” section displayed in background area 910 gradually moves left out of view, in synchronization with the movement of the last few pages of the “Introduction” section. At the same time, the tile page 940A of “Chapter 1” gradually moves left into view to be displayed in background area 910, also in synchronization with the movement of the first few pages of “Chapter 1”. Eventually, title page 940A of “Chapter 1” replaces title page 930A of the “Introduction” section when “Chapter 1” becomes the current section being viewed by the user. In another situation, as a user's finger slides in the left direction across background area 910, title page 930A of the “Introduction” section gradually moves left out of view, following by title page 940A of “Chapter 1”, which gradually moves left into view to be displayed in background area 910, effectively replacing title page 930A of the “Introduction” section. In synchronization with the movement of title pages 930A and 940A, the last few pages of the “Introduction” section gradually move left out of view and the first few pages of “Chapter 1” gradually move left into view in TOC area 920. As illustrated in FIG. 9C, at the point of transition 950 between the two sections, the right or left edge of the title page in background area 910 lines up with the right or left edge of the last or first page, respectively, of the corresponding section in TOC area 920. The transition between a current section and a section immediately before the current section behaves similarly, with the exception that instead of moving in the left direction across the screen of the electronic device, objects move in the right direction.

User Intent During Scrolling

When the user is scrolling through objects in a hierarchy, as the user's fingers swipe across the screen, particular embodiments may estimate which specific object the user will view at a predetermined time in the future (e.g., 0.2 seconds in the future) based on the velocity or acceleration of the finger movements. For example, as the user is scrolling through a series of sections in a book, where each section may include a number of pages, particular embodiments may estimate which section the user will view 0.5 seconds in the future. As the user is scrolling through a series of photo albums, where each album may include a number of photos, particular embodiments may estimate which album the user will view 0.4 seconds in the future. This may enable the device to preload (e.g., download or render) the pages in that section or the photos in that album so that when the user is ready to view the pages or photos, they are already available and ready. In other words, as the user is scrolling through objects at a specific level of the hierarchy, particular embodiments may estimate which object the user will view at a predetermined time in the future. Then the child objects of that object may be preloaded so that they are ready for the user. For example, the child objects may be downloaded from a server or rendered on the user's device.

In particular embodiments, as the user swipes his fingers across the screen to scroll through a series of object, the velocity of the finger movements may be detected. The acceleration of the finger movements may be computed based on the velocity. The estimation may be based on the acceleration. For example, higher acceleration may suggest that the user will view an object further away from the object currently being displayed on the screen while lower acceleration may suggest that the user will view an object closer to the object currently being displayed on the screen at the predetermined time in the future.

In particular embodiments, the vector of the user's touch input, or its derivative vector, may be utilized to ascertain whether a user wishes to browse other objects on the same hierarchical level as the current object, or the child objects of the current object. For example, if a user is swiping through a series of photo album objects on a profile page in a social networking website, the touch input vector may have a high velocity, or, even more tellingly, a high acceleration. Such an input may signal to the application that the user wishes to browse other photo albums, and the application may begin downloading photo album thumbnails based on the magnitude of acceleration or velocity of the input vector. For example, if a user swipes from the ith album at a high velocity or acceleration, the application may load thumbnails for the (i+10)th album, whereas if a user swipes slowly from the ith album, the application may load thumbnails for the (i+1)th album. Conversely, if there is no velocity or acceleration to the input vector (i.e., no swiping input), the application may begin to download the child objects (individual photos) of the currently viewed album cover. In the context of a digital book, content elements may be pre-drawn and loaded into a buffer based on where the user has scrolled; the digital book application extrapolates from the user's screen size to determine the size and contents of the buffer.

Spring Motions During Object Animation

In particular embodiments, movements of an object displayed in a user interface on a screen may be simulated based on spring movement. As the user interacts with the object, the object may move around the screen. This may be shown as animated sequences depicting the object's movements. For example, as the user picks up an object by pinching the object with two fingers, the object may move with the user's fingers. If the use releases the object, the object may return to its original position. The user may throw the object against the edge of the screen, causing the object to bounce around the screen.

In particular embodiments, movements of the object may be simulated by attaching one end of a virtual spring to the object and another end of the virtual spring to a position on the screen (e.g., the original position of the object, the center of the screen, a corner of the screen, or an edge of the screen). Any number of virtual springs may be attached to an object. In particular embodiments, the movements of the object may be determined based on Hooke's law: F=−kx; where x is the displacement of the spring's end from it's equilibrium position (e.g., a distance, in SI units: meters), F is the restoring force exerted by the spring on that end (in SI units: N or kg·m/s²), and k is a constant called the rate or spring constant (in SI units: N/m or kg/s²). When this equation holds, the behavior is said to be linear. The negative sign on the right hand side of the equation is there because the restoring force always acts in the opposite direction of the displacement (e.g., when a spring is stretched to the left, it pulls back to the right). In general, the following properties are involved in determining spring movement: mass, damping, spring stiffness, spring rest length. In some implementations, a virtual mass may be assigned to the object.

In particular embodiments, a virtual spring may have different state values based on what the user is doing (e.g., how the user is interacting with the object). The spring may ramp from one set of state value to another, instead of cutting, to make animation sequence of the object's movements appear more natural. For example the distance between an edge of the object and the user's finger on the object may be used to determine the tightening of the springs used in the animation or the level of ramping from one set of state values to another.

In particular embodiments, a physics engine implements the algorithms that simulate spring movement. A number of springs may be attached to an object. For example, if an object is pinched by a user with two fingers, two springs may be attached to the object at the positions corresponding to the fingers pinching the object. As the object moves (e.g., dragged by the user's fingers), its movement follows the paths of the springs, so that the movement of the object is animated based on the physics of the spring movement. In particular embodiments, the algorithm may take into consideration variables such as tension, mass, damping effect, the velocity of the finger's movement, etc. As an example, if the user's finger moves faster, it may cause the object to bounce more. Conversely, if the user's finger moves slower, the object may bounce less. As another example, the springs may tighten or loosen depending on where the fingers touch and pinch an object. When the spring is closer to a finger, it may tighten. When the spring is further away from a finger, it may loosen. When the spring tightens (e.g., an image is more folded due to the user's fingers pinching the image moving closer together), there may be less movement on the part of the object. Conversely, when the spring loosens (e.g., an image is less folded due to the user's fingers pinching the image moving further apart), there may be more movement on the part of the object. In some implementations, when two fingers pinching an image move apart to unfold the image or move close to fold the image, the edges of the image pinched by the two fingers may first unfold or fold pass the fingers' positions, and then bounce and fold or unfold back to find the correction positions of the fingers, and thus the correct degree of unfolding or folding. This allows the image to determine its folding and unfolding degrees in real time.

In particular embodiments, the movement of an object may be predicted based on a user's intent. For example, if a user picks up an object and then moves the fingers toward the left side of the screen, the user's intent may be to place the object near the left side of the screen. The object's final position may be projected based on the direction as well as the velocity of the user's finger movement (e.g., the position the object may move to in 0.5 seconds time).

In particular embodiments, animation of the objects are implemented based on the algorithms implemented in the physical engine. For example, when an object is pinched up, moved to a different position, and then released, the object may bounce around a little. This is implemented as an animation sequence. The bouncing path and characteristics of the movement may be governed by the algorithms implemented in the physics engine.

In particular embodiments, when an image is picked up, the animation of its movements following the user's fingers may be based on spring motions. For example, how much should the image fold or unfold, how much should the image rotate, or how much should the image bounce against the edge of the screen, as the user's fingers move may be determined based on spring motions. In particular embodiments, an image's movements may be simulated by, supposedly, attaching the image to an imaginary spring. When the user's fingers pick up the image, the supposed force the user's fingers exert on the image may cause the image to have supposed mass. When an object with mass (e.g., an image with supposed mass) is attached to a spring, its movements may follow specific physical properties. In addition to the mass, the spring may have properties such as, for example and without limitation, tension, stretch, and dampening. By selecting various values for these properties, different movements of the image may be simulated.

In particular embodiments, when zooming in on an object, the object increases in size. When zooming out on an object, the object decreases in size. The changing of the object's size may be depicted in an animation sequence, where the movements of the object may be based on spring movements.

In particular embodiments, as an object moves towards its final destination, the intermediate positions of the object may be interpolated based on spring movements.

Electronic Device

Particular embodiments may be implemented on one or more electronic devices or computer systems. For example, the user interface may be displayed on the screen of such an electronic device. FIG. 10 illustrates an example electronic device 1000. In particular embodiments, one or more computer systems 1000 perform one or more steps of one or more methods described or illustrated herein. In particular embodiments, one or more computer systems 1000 provide functionality described or illustrated herein. In particular embodiments, software running on one or more computer systems 1000 performs one or more steps of one or more methods described or illustrated herein or provides functionality described or illustrated herein. Particular embodiments include one or more portions of one or more computer systems 1000.

This disclosure contemplates any suitable number of computer systems 1000. This disclosure contemplates computer system 1000 taking any suitable physical form. As example and not by way of limitation, computer system 1000 may be an embedded computer system, a system-on-chip (SOC), a single-board computer system (SBC) (such as, for example, a computer-on-module (COM) or system-on-module (SOM)), a desktop computer system, a laptop or notebook computer system, an interactive kiosk, a mainframe, a mesh of computer systems, a mobile telephone, a personal digital assistant (PDA), a server, or a combination of two or more of these. Where appropriate, computer system 1000 may include one or more computer systems 1000; be unitary or distributed; span multiple locations; span multiple machines; or reside in a cloud, which may include one or more cloud components in one or more networks. Where appropriate, one or more computer systems 1000 may perform without substantial spatial or temporal limitation one or more steps of one or more methods described or illustrated herein. As an example and not by way of limitation, one or more computer systems 1000 may perform in real time or in batch mode one or more steps of one or more methods described or illustrated herein. One or more computer systems 1000 may perform at different times or at different locations one or more steps of one or more methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 1000 includes a processor 1002, memory 1004, storage 1006, an input/output (I/O) interface 1008, a communication interface 1010, and a bus 1012. Although this disclosure describes and illustrates a particular computer system having a particular number of particular components in a particular arrangement, this disclosure contemplates any suitable computer system having any suitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 1002 includes hardware for executing instructions, such as those making up a computer program. As an example and not by way of limitation, to execute instructions, processor 1002 may retrieve (or fetch) the instructions from an internal register, an internal cache, memory 1004, or storage 1006; decode and execute them; and then write one or more results to an internal register, an internal cache, memory 1004, or storage 1006. In particular embodiments, processor 1002 may include one or more internal caches for data, instructions, or addresses. This disclosure contemplates processor 1002 including any suitable number of any suitable internal caches, where appropriate. As an example and not by way of limitation, processor 1002 may include one or more instruction caches, one or more data caches, and one or more translation lookaside buffers (TLBs). Instructions in the instruction caches may be copies of instructions in memory 1004 or storage 1006, and the instruction caches may speed up retrieval of those instructions by processor 1002. Data in the data caches may be copies of data in memory 1004 or storage 1006 for instructions executing at processor 1002 to operate on; the results of previous instructions executed at processor 1002 for access by subsequent instructions executing at processor 1002 or for writing to memory 1004 or storage 1006; or other suitable data. The data caches may speed up read or write operations by processor 1002. The TLBs may speed up virtual-address translation for processor 1002. In particular embodiments, processor 1002 may include one or more internal registers for data, instructions, or addresses. This disclosure contemplates processor 1002 including any suitable number of any suitable internal registers, where appropriate. Where appropriate, processor 1002 may include one or more arithmetic logic units (ALUs); be a multi-core processor; or include one or more processors 1002. Although this disclosure describes and illustrates a particular processor, this disclosure contemplates any suitable processor.

In particular embodiments, memory 1004 includes main memory for storing instructions for processor 1002 to execute or data for processor 1002 to operate on. As an example and not by way of limitation, computer system 1000 may load instructions from storage 1006 or another source (such as, for example, another computer system 1000) to memory 1004. Processor 1002 may then load the instructions from memory 1004 to an internal register or internal cache. To execute the instructions, processor 1002 may retrieve the instructions from the internal register or internal cache and decode them. During or after execution of the instructions, processor 1002 may write one or more results (which may be intermediate or final results) to the internal register or internal cache. Processor 1002 may then write one or more of those results to memory 1004. In particular embodiments, processor 1002 executes only instructions in one or more internal registers or internal caches or in memory 1004 (as opposed to storage 1006 or elsewhere) and operates only on data in one or more internal registers or internal caches or in memory 1004 (as opposed to storage 1006 or elsewhere). One or more memory buses (which may each include an address bus and a data bus) may couple processor 1002 to memory 1004. Bus 1012 may include one or more memory buses, as described below. In particular embodiments, one or more memory management units (MMUs) reside between processor 1002 and memory 1004 and facilitate accesses to memory 1004 requested by processor 1002. In particular embodiments, memory 1004 includes random access memory (RAM). This RAM may be volatile memory, where appropriate. Where appropriate, this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, where appropriate, this RAM may be single-ported or multi-ported RAM. This disclosure contemplates any suitable RAM. Memory 1004 may include one or more memories 1004, where appropriate. Although this disclosure describes and illustrates particular memory, this disclosure contemplates any suitable memory.

In particular embodiments, storage 1006 includes mass storage for data or instructions. As an example and not by way of limitation, storage 1006 may include an HDD, a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Storage 1006 may include removable or non-removable (or fixed) media, where appropriate. Storage 1006 may be internal or external to computer system 1000, where appropriate. In particular embodiments, storage 1006 is non-volatile, solid-state memory. In particular embodiments, storage 1006 includes read-only memory (ROM). Where appropriate, this ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory or a combination of two or more of these. This disclosure contemplates mass storage 1006 taking any suitable physical form. Storage 1006 may include one or more storage control units facilitating communication between processor 1002 and storage 1006, where appropriate. Where appropriate, storage 1006 may include one or more storages 1006. Although this disclosure describes and illustrates particular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 1008 includes hardware, software, or both providing one or more interfaces for communication between computer system 1000 and one or more I/O devices. Computer system 1000 may include one or more of these I/O devices, where appropriate. One or more of these I/O devices may enable communication between a person and computer system 1000. As an example and not by way of limitation, an I/O device may include a keyboard, keypad, microphone, monitor, mouse, printer, scanner, speaker, still camera, stylus, tablet, touch screen, trackball, video camera, another suitable I/O device or a combination of two or more of these. An I/O device may include one or more sensors. This disclosure contemplates any suitable I/O devices and any suitable I/O interfaces 1008 for them. Where appropriate, I/O interface 1008 may include one or more device or software drivers enabling processor 1002 to drive one or more of these I/O devices. I/O interface 1008 may include one or more I/O interfaces 1008, where appropriate. Although this disclosure describes and illustrates a particular I/O interface, this disclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 1010 includes hardware, software, or both providing one or more interfaces for communication (such as, for example, packet-based communication) between computer system 1000 and one or more other computer systems 1000 or one or more networks. As an example and not by way of limitation, communication interface 1010 may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or other wire-based network or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network, such as a WI-FI network. This disclosure contemplates any suitable network and any suitable communication interface 1010 for it. As an example and not by way of limitation, computer system 1000 may communicate with an ad hoc network, a personal area network (PAN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or one or more portions of the Internet or a combination of two or more of these. One or more portions of one or more of these networks may be wired or wireless. As an example, computer system 1000 may communicate with a wireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAX network, a cellular telephone network (such as, for example, a Global System for Mobile Communications (GSM) network), or other suitable wireless network or a combination of two or more of these. Computer system 1000 may include any suitable communication interface 1010 for any of these networks, where appropriate. Communication interface 1010 may include one or more communication interfaces 1010, where appropriate. Although this disclosure describes and illustrates a particular communication interface, this disclosure contemplates any suitable communication interface.

In particular embodiments, bus 1012 includes hardware, software, or both coupling components of computer system 1000 to each other. As an example and not by way of limitation, bus 1012 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT) interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBAND interconnect, a low-pin-count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCIe) bus, a serial advanced technology attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these. Bus 1012 may include one or more buses 1012, where appropriate. Although this disclosure describes and illustrates a particular bus, this disclosure contemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media may include one or more semiconductor-based or other integrated circuits (ICs) (such, as for example, field-programmable gate arrays (FPGAs) or application-specific ICs (ASICs)), hard disk drives (HDDs), hybrid hard drives (HHDs), optical discs, optical disc drives (ODDs), magneto-optical discs, magneto-optical drives, floppy diskettes, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM-drives, SECURE DIGITAL cards or drives, any other suitable computer-readable non-transitory storage medium or media, or any suitable combination of two or more of these, where appropriate. A computer-readable non-transitory storage medium or media may be volatile, non-volatile, or a combination of volatile and non-volatile, where appropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicated otherwise or indicated otherwise by context. Therefore, herein, “A or B” means “A, B, or both,” unless expressly indicated otherwise or indicated otherwise by context. Moreover, “and” is both joint and several, unless expressly indicated otherwise or indicated otherwise by context. Therefore, herein, “A and B” means “A and B, jointly or severally,” unless expressly indicated otherwise or indicated otherwise by context.

This disclosure encompasses all changes, substitutions, variations, alterations, and modifications to the example embodiments herein that a person having ordinary skill in the art would comprehend. Moreover, reference in the appended claims to an apparatus or system or a component of an apparatus or system being adapted to, arranged to, capable of, configured to, enabled to, operable to, or operative to perform a particular function encompasses that apparatus, system, component, whether or not it or that particular function is activated, turned on, or unlocked, as long as that apparatus, system, or component is so adapted, arranged, capable, configured, enabled, operable, or operative. 

What is claimed is:
 1. A computer-implemented method comprising: displaying an object on a page of a digital book over a background on a screen of an electronic device; and displaying a shadow effect for the object on the screen of the electronic device, comprising: simulating a three-dimensional (3D) environment encompassing the object; simulating a light source at a specific position within the simulated 3D environment; simulating a shadow cast by the object on the page as a result of the light source shining on the page in the simulated 3D environment; and rendering the shadow on the screen of the electronic device; wherein when the object is manipulated to be folded in the 3D environment such that at least a first portion of the object faces the light source and at least a second portion of the object faces away from the light source, the object is rotated such that a greater portion of the first portion that faces the light source is displayed on the screen, and a smaller portion of the second portion that faces away from the light source is displayed on the screen.
 2. The computer-implemented method of claim 1, wherein simulating the shadow cast by the object comprises: placing a pixel behind the object and near the center of the object; enlarging and blurring the pixel until the pixel extends beyond at least one edge of the object.
 3. The computer-implemented method of claim 1, wherein the shadow is simulated based on a spatial relationship between a current position of the object and the specific position of the light source, a current orientation of the object, and a current size of the object.
 4. The computer-implemented method of claim 1, wherein the object is displayed at a first layer of a user interface and the page is displayed at a second layer below the first layer of the user interface.
 5. The computer-implemented method of claim 1, further comprising in response to a user interacting with the object, simulating an effect of the user picking up the object by decreasing a size of the page and increasing a size of the shadow to simulate a greater distance between the object and the page.
 6. The computer-implemented method of claim 1, further comprising in response to a user moving the object from its current position to a new position, adjusting a size and a shape of the shadow cast by the object on the page based on a spatial relationship between the new position of the object and the specific position of the light source in the simulated 3D environment.
 7. The computer-implemented method of claim 1, further comprising in response to a user rotating the object from its current orientation to a new orientation, adjusting a shape of the shadow cast by the object on the page based on the new orientation of the object.
 8. The computer-implemented method of claim 1, further comprising in response to a user zooming the object from its current size to a new size, adjusting a size of the shadow cast by the object on the page based on the new size of the object.
 9. One or more computer-readable non-transitory storage media embodying software that is operable when executed by one or more processors to: display an object of a digital book over a background on a screen of an electronic device; and display a shadow effect for the object on the screen of the electronic device, comprising: simulate a three-dimensional (3D) environment encompassing the object on the page; simulate a light source at a specific position within the simulated 3D environment; simulate a shadow cast by the object on the page as a result of the light source shining on the page in the simulated 3D environment; and render the shadow on the screen of the electronic device; wherein when the object is manipulated to be folded in the 3D environment such that at least a first portion of the object faces the light source and at least a second portion of the object faces away from the light source, the object is rotated such that a greater portion of the first portion that faces the light source is displayed on the screen, and a smaller portion of the second portion that faces away from the light source is displayed on the screen.
 10. The computer-readable non-transitory storage media of claim 9, wherein simulate the shadow cast by the object comprises: place a pixel behind the object and near the center of the object; enlarge and blurring the pixel until the pixel extends beyond at least one edge of the object.
 11. The computer-readable non-transitory storage media of claim 9, wherein the shadow is simulated based on a spatial relationship between a current position of the object and the specific position of the light source, a current orientation of the object, and a current size of the object.
 12. The computer-readable non-transitory storage media of claim 9, wherein the object is displayed at a first layer of a user interface and the page is displayed at a second layer below the first layer of the user interface.
 13. The computer-readable non-transitory storage media of claim 9, wherein the software is further operable to in response to a user interacting with the object, simulate an effect of the user picking up the object by decreasing a size of the page and increasing a size of the shadow to simulate a greater distance between the object and the page.
 14. The computer-readable non-transitory storage media of claim 9, wherein the software is further operable to in response to a user moving the object from its current position to a new position, adjust a size and a shape of the shadow cast by the object on the page based on a spatial relationship between the new position of the object and the specific position of the light source in the simulated 3D environment.
 15. The computer-readable non-transitory storage media of claim 9, wherein the software is further operable to in response to a user rotating the object from its current orientation to a new orientation, adjust a shape of the shadow cast by the object on the page based on the new orientation of the object.
 16. The computer-readable non-transitory storage media of claim 9, wherein the software is further operable to in response to a user zooming the object from its current size to a new size, adjust a size of the shadow cast by the object on the page based on the new size of the object.
 17. A system comprising: one or more processors; and a memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to: display an object on a page of a digital book over a background on a screen of an electronic device; and display a shadow effect for the object on the screen of the electronic device, comprising: simulate a three-dimensional (3D) environment encompassing the object; simulate a light source at a specific position within the simulated 3D environment; simulate a shadow cast by the object on the page as a result of the light source shining on the page in the simulated 3D environment; and render the shadow on the screen of the electronic device; wherein when the object is manipulated to be folded in the 3D environment such that at least a first portion of the object faces the light source and at least a second portion of the object faces away from the light source, the object is rotated such that a greater portion of the first portion that faces the light source is displayed on the screen, and a smaller portion of the second portion that faces away from the light source is displayed on the screen.
 18. The system of claim 17, wherein simulate the shadow cast by the object comprises: place a pixel behind the object and near the center of the object; enlarge and blurring the pixel until the pixel extends beyond at least one edge of the object.
 19. The system of claim 17, wherein the shadow is simulated based on a spatial relationship between a current position of the object and the specific position of the light source, a current orientation of the object, and a current size of the object.
 20. The system of claim 17, wherein the object is displayed at a first layer of a user interface and the page is displayed at a second layer below the first layer of the user interface. 